import random
prizee=[0,0,0,0]
def winner(num):
    for i in range(num):
        testnum = random.sample(range(1, 33), 8)
        checkNumber(testnum)
    print("一等奖中奖次数为：{}".format(prizee[0]))
    print("二等奖中奖次数为：{}".format(prizee[1]))
    print("三等奖中奖次数为：{}".format(prizee[2]))
    print("四等奖中奖次数为：{}".format(prizee[3]))

def checkNumber(number):
    winnerNum= random.sample(range(1,33),8)
    ci=len(set(winnerNum) & set(number))
    if ci==8:
        prizee[0] += 1
        print("一等奖，中奖的号码：{}".format(winnerNum))
    elif ci==7:
        prizee[1]+=1
        print("二等奖，中奖的号码：{}".format(winnerNum))
    elif ci==6:
        prizee[2]+=1
        print("三等奖，中奖的号码：{}".format(winnerNum))
    elif ci==5:
        prizee[3]+=1
        print("四等奖，中奖的号码：{}".format(winnerNum))

winner(10000)

